<?php

namespace App\Models;

use App\User;
use Illuminate\Database\Eloquent\Model;

/**
 * 兼容老项目 tn_doctor表 仅做创建医生账号时，写入 tn_doctor表数据
 * Class DoctorDetail
 * @package App\Models
 */
class Doctor extends Model
{
    protected $table = 'tn_doctor';

    protected $fillable = [
        'ACCOUNT', 'JOB','HOSPITAL','SKILLED','DESC','PIC','EXPERIENCE','TIMES','SORT','TYPE',
        'HOSPITALID','PLACE','DOWNNUM','DOCTORCODE','TAG','DEPARTMENT'
    ];

    protected $primaryKey = 'ACCOUNT';

    public $timestamps = false;

    public function user()
    {
        return $this->belongsTo(User::class, 'ACCOUNT', 'account');
    }

}
